package com.ruoyi.quartz.task;

import com.ruoyi.chat.domain.ChatLast;
import com.ruoyi.wechat.service.WeChatMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.Date;

/**
 * @author chengliang
 * @date 2022/3/2
 **/
@Component("TestTask")
public class TestTask {

    @Autowired
    private WeChatMessageService service;
    public void test(Long memberId,Long storeId,String content){
        ChatLast chatLast = new ChatLast();
        chatLast.setContent(content);
        chatLast.setMemberId(memberId);
        chatLast.setStoreId(storeId);
        chatLast.setCreateTime(new Date());
//        service.question(chatLast);
        service.answer(chatLast);
    }
}
